prepare("select * from designate where positions = '$names'") ; $chk->execute(); if($chk->rowcount() > 0) { $msg = "Position Already Registered, Register another" ; } else { if($user->regposition($names)) { $msg = "Position Registered Successfully" ; } } } ?>